﻿using System;

class MyMath
{
    
    public int Add(int a, int b)
    {
        return a + b;
    }

    public int Subtract(int a, int b)
    {
        return a - b;
    }

    public int Multiply(int a, int b)
    {
        return a * b;
    }

    public double Divide(int a, int b)
    {
        if (b == 0)
        {
            throw new DivideByZeroException("除数不能为零");
        }
        return (double)a / b;
    }
}

class Program
{
    static void Main(string[] args)
    {
        MyMath myMath = new MyMath();
        Console.WriteLine($"3 + 5 = {myMath.Add(3, 5)}");
        Console.WriteLine($"8 - 3 = {myMath.Subtract(8, 3)}"); 
        Console.WriteLine($"4 × 6 = {myMath.Multiply(4, 6)}");
        Console.WriteLine($"10 ÷ 2 = {myMath.Divide(10, 2)}");
        try
        {
            Console.WriteLine($"5 ÷ 0 = {myMath.Divide(5, 0)}");
        }
        catch (DivideByZeroException ex)
        {
            Console.WriteLine(ex.Message);
        }
    }
}
